package com.laxia.exception.ensure;


import com.laxia.exception.ensure.extensions.EnsureParamBooleanExtension;
import com.laxia.exception.ensure.extensions.EnsureParamCollectionExtension;
import com.laxia.exception.ensure.extensions.EnsureParamObjectExtension;
import com.laxia.exception.ensure.extensions.EnsureParamStringExtension;

import java.util.Collection;

/**
 * 断言工具类
 *
 * @author weishuai
 */
public class Ensure {

    public static EnsureParamObjectExtension that(Object obj) {
        return new EnsureParamObjectExtension(obj);
    }

    public static EnsureParamBooleanExtension that(boolean obj) {
        return new EnsureParamBooleanExtension(obj);
    }

    public static <T extends Boolean> EnsureParamBooleanExtension that(T obj) {
        return new EnsureParamBooleanExtension(obj);
    }

    public static EnsureParamStringExtension that(String str) {
        return new EnsureParamStringExtension(str);
    }

    public static EnsureParamCollectionExtension that(Collection collection) {
        return new EnsureParamCollectionExtension(collection);
    }

}
